package com.eims.sls_app.ui.adapter;

import bls.juejin.cn.R;
import android.content.Context;
import android.graphics.Camera;
import android.graphics.Matrix;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.Transformation;
import android.widget.BaseAdapter;
import android.widget.ImageView;

public class LuckDrawGvAdapter extends BaseAdapter {
	private Context context;
	private int[] pic;
	
	

	public LuckDrawGvAdapter(Context context, int[] pic) {
		super();
		this.context = context;
		this.pic = pic;
	}

	@Override
	public int getCount() {
		
		return pic.length;
	}

	@Override
	public Object getItem(int position) {
		
		return position;
	}

	@Override
	public long getItemId(int position) {
		
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHoloder holoder = null;
		if (convertView==null) {
			holoder = new ViewHoloder();
			convertView = LayoutInflater.from(context).inflate(
					R.layout.layout_lucky_gv_item, null);
			holoder.iv_lucky = (ImageView) convertView.findViewById(R.id.iv_lucky);
			convertView.setTag(holoder);
		}else {
			holoder = (ViewHoloder) convertView.getTag();
		}
		holoder.iv_lucky.setImageResource(pic[position]);

		return convertView;
	}
	
	public class ViewHoloder {

		ImageView iv_lucky;
	}
	
	
	

}
